< previous page page_722 next page >

Page 722
Conditional Compile
For conditional compilation constants, use the prefix cc:
9f31265bb40b592b1929e18a47ab28e5.gif
#If ccDEMO Then
   ' Perform some code here
#End If
Variant Data Type
If you know that a variable will always store data of a particular type, Visual Basic can handle that data more efficiently if you declare the variable of that type. For example, if you need to loop through an array, create an index of the type Integer, not Variant. In other words, avoid the use of Variant unless its absolutely necessary.
Function and Procedure Naming
Here are some general guidelines to follow when naming your functions and procedures:
Use mixed case, where each word in the procedure is capitalized.
Preface all functions and procedures with a noun.
Follow this noun with the action that will be performed on that noun.
Do not use underscores in your function namesthis makes it hard to determine which procedures are yours and which are Visual Basic event procedures.
Here are some examples of procedure names that should not be used because the verb comes first:
DisplayForm
InitializeForm
LoadStates

 
< previous page page_722 next page >

If you like this book, buy it!